#include <iostream>
#include "dbclist.h"
using namespace std;

bool equal(ElemType a, ElemType b)
{
	return a==b;
}

int main()
{
	DbcList dbcl;
	dbcl.ListInsert(1);
	dbcl.ListInsert(2);
	dbcl.ListInsert(3);
	dbcl.ListInsert(4);
	dbcl.ListInsert(5);
	cout << "Before: ";
	for(int i = 1; i <= dbcl.ListLength(); i++)
		cout << dbcl.GetElem(i) << " ";
	cout << endl;
	cout << "The index of 5: " << dbcl.LocateElem(5, equal);
	cout << endl;
	cout << "After ";
	for(int i = 1; i <= dbcl.ListLength(); i++)
		cout << dbcl.GetElem(i) << " ";
	cout << endl;
	return 0;
}